import pako from 'pako'
import { setUrl } from './getUrl.js'
import { pinT } from './allUrl.js'
import axios from 'axios'

const province = async () => {
  const { data: res } = await axios.post(pinT + 'district/all')
  const a = pako.inflate(res.data, { to: 'string' })
  // setUrl('district', JSON.stringify(res.data))
  setUrl('district', a)
}

// const pakoJM = () => {
//   const shuju = getUrl('district')
//   const a = pako.inflate(JSON.parse(shuju), { to: 'string' })
//   return a
// }

export { province }
